module Node;

import DND;

import S306;
import DefVar;
import DefOrder;
import World;
import Database;

void Node::RefreshUI()
{
	_ui._sprTerrain = g_factory->CreateSprite("terrain", _sl._typeTerrain);

	/*if(_sl._typeTerrain == g_db->GetTerrainId("water"))
		_ui._sprTerrain->SetOrder(DefOrder::WATER);
	else*/
		_ui._sprTerrain->SetOrder(DefOrder::TERRAIN);

	_ui._sprTerrain->SetCoor(g_world->GetCoor());
	_ui._sprTerrain->SetQuad(_ui._sprTerrain->GetQuad()
		+ toVector2(_sl._xy) * DefVar::NODE_PIXEL);

	//更新tex地图
	g_world->UpdateMapTex(_sl);
}